package fauxman.DynamicElements;

import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.util.Collection;

import fauxman.Enums.GameElementName;
import fauxman.StaticElements.PlayableArea;
import fauxman.interfaces.MoveableElement;
import fauxman.model.WorldModel;
import fauxman.utilities.ActionUtil;
import fauxman.utilities.SpriteUtil;

public class Bonus extends MoveableElement{
	// TODO: Make bonus score state
	protected BufferedImage appearance;
	private WorldModel model;
	
	public Bonus(int conX, int conY, int disX, int disY, int width, int height, WorldModel model){
		this.conX = conX;
		this.conY = conY;
		this.disX = disX;
		this.disY = disY;
		this.width = width;
		this.height = height;
		this.conHitbox = new Rectangle(conX+(width/3), conY+(height/3), width/3, height/3);
		appearance = SpriteUtil.getBonusSprite(0);
		setCurrentDirection(ActionUtil.SOUTH);
		setNextDirection(getCurrentDirection());
		this.lookAhead = new Point(disX,disY);
		this.gNum = GameElementName.BONUS;
		this.model = model;
	}
	
	public void draw(Graphics g) {
		g.drawImage(appearance, conX, conY, width, height, null);
	}
	
	public boolean isCollisionNecessary(){
		return false;
	}
	
	public String toString(){
		return "BO";
	}

	@Override
	public Collection<? extends PlayableArea> getPlayableArea() {
		return model.getPlayableArea();
	}
}
